import request from "@/utils/request";

// 查询出库详情列表
export function listMachineCkD(query) {
  return request({
    url: "/machine/machineCkD/list",
    method: "get",
    params: query,
  });
}

// 通过商品id查询最近销售出库的商品金额
export function lastMachineCkD(query) {
  return request({
    url: "/machine/machineCkD/lastMachineCkD",
    method: "get",
    params: query,
  });
}

// 查询出库详情详细
export function getMachineCkD(id) {
  return request({
    url: "/machine/machineCkD/" + id,
    method: "get",
  });
}

// 新增出库详情
export function addMachineCkD(data) {
  return request({
    url: "/machine/machineCkD",
    method: "post",
    data: data,
  });
}

// 修改出库详情
export function updateMachineCkD(data) {
  return request({
    url: "/machine/machineCkD",
    method: "put",
    data: data,
  });
}

// 删除出库详情
export function delMachineCkD(id) {
  return request({
    url: "/machine/machineCkD/" + id,
    method: "delete",
  });
}
